<template>
  <div class="container">
    <div :class="['wrapper',isCollapse ? 'closedWrapper' : 'openWrapper']">
      <slot />
    </div>
  </div>
</template>
<script>
  import { mapGetters } from "vuex";
export default {
  name: 'FooterFixed',
  computed: {
    ...mapGetters(["sidebar"]),
    isCollapse() {
      return !this.sidebar.opened;
    }
  },
}
</script>
<style lang="scss" scoped>
  @import "~@/styles/mixin.scss";
  @import "~@/styles/variables.scss";
  .container {
    width: 100%;
    height: 70px;

    .wrapper {
      position: fixed;
      right: 0;
      bottom: 0;
      box-shadow:0px -2px 8px 0px rgba(24,28,85,0.08);
      z-index: 11;
      transition: width 0.28s;
      /*width: 100%;*/
     /* width: calc(100% - #{$sideBarWidth});*/
      /*padding: 0 36px;*/
      height: 70px;

      background: #fff;
      text-align: center;
      white-space: nowrap;
      overflow: auto;
      &::after {
        content: '';
        display: inline-block;
        height: 100%;
        vertical-align: middle;
      }
    }
    .openWrapper {
      width: calc(100% - #{$sideBarWidth})
    }
    .closedWrapper {
      width: calc(100% - 54px)
    }
    @media screen and (max-width: 1000px){
      .wrapper {
        width: 100%
      }
    }
  }
</style>
